let data={
    msg:{
        name:'hyw',
        id:'1903010120',
        class:'19应用 3-1班'},
    ImgColor:['#6495ED','#00FF00','#00BFFF','#ffd000'],
    ImgSrc:['figure/1.jpg','figure/2.jpg','figure/3.jpg','figure/4.jpg']
}
console.log(data)

let Ditemdivle=document.getElementsByTagName('itemdiv')
console.log(Ditemdivle)

let div1=document.querySelectorAll('#div1 .itemdiv')
console.log(div1)
div1[0].textContent=data.msg.class
div1[1].textContent=data.msg.id
div1[2].textContent=data.msg.name

let div2=document.querySelectorAll('#div2 .itemdiv')
console.log(div2)
div2[0].style.background=data.ImgColor[0]
div2[1].style.background=data.ImgColor[1]
div2[2].style.background=data.ImgColor[2]
div2[3].style.background=data.ImgColor[3]


let Ele=document.querySelectorAll('#div3 div')
for(let i=0;i<data.ImgSrc.length;i++){
  let NewEle=document.createElement('img')
  NewEle.src=data.ImgSrc[i]   
  Ele[i].textContent=''
  Ele[i].appendChild(NewEle)
}